package com.pagoda.nerp.trade.common;

import com.github.pagehelper.Page;

import java.io.Serializable;
import java.util.List;

/**
 * Created by Jungle on 2016/12/14.
 */
public class PageListResult<T> implements Serializable {

    private Page<T> page;
    protected List<T> list;

    public PageListResult(Page<T> page, List<T> list) {
        this.page = page;
        this.list = list;
    }

    public PageListResult(List<T> list) {
        this.list = list;
    }

    public Page<T> getPage() {
        return page;
    }

    public void setPage(Page<T> page) {
        this.page = page;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public int getPageTotalCount(){
        return (int) this.getPage().getTotal();
    }

}
